From: Sebastian Keller Date: Thu, 5 Aug 2021 05:22:07 +0000 (+0200) Subject: screenShield: Close inhibitors that finished creation after uninhibition X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~574^2^2~118 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=85075192f34060c20ed99271a73145d75b4a5e49;p=gnome-shell.git screenShield: Close inhibitors that finished creation after uninhibition There was a potential issue when suspend was inhibited and immediately uninhibited again before the creation of the inhibitor has finished. Then the new inhibitor would be kept active. Part-of: --- diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index de8b7f409..04353d93b 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -224,6 +224,12 @@ var ScreenShield = class { else this._inhibitor = inhibitor; } + + // Handle uninhibits that happened after the start + if (!this._inhibited) { + this._inhibitor?.close(null); + this._inhibitor = null; + } }); } else { this._inhibitor?.close(null);